package com.liwalla.domain;

import javax.persistence.Entity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import org.springframework.roo.addon.entity.RooEntity;
import com.liwalla.domain.Kid;
import javax.validation.constraints.NotNull;
import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;
import com.liwalla.domain.Parent;

@Entity
@RooJavaBean
@RooToString
@RooEntity
public class Post {

    @NotNull
    @ManyToOne(targetEntity = Kid.class)
    @JoinColumn
    private Kid to;

    @NotNull
    @ManyToOne(targetEntity = Parent.class)
    @JoinColumn
    private Parent fromWho;

    private String message;
}
